package com.jiuyin.dianjing.api.loader;

import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

/**
 * Description:
 * File: ObjectLoader.java
 *
 * @Author: Administrator
 * Create: 2018/07/30 09:29
 */
class ObjectLoader {
    /**
     * @param observable Observable
     * @param <T>        observe
     * @return Observable
     */
    <T> Observable<T> observe(Observable<T> observable) {
        return observable
                .subscribeOn(Schedulers.io())
                .unsubscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread());
    }
}
